package com.smartfarm.domain.task;

import lombok.Builder;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 农机作业任务
 */
@Data
@Builder
public class Task {
    private String taskId;                  // 任务ID
    private String taskName;                // 任务名称
    private String taskType;                // 任务类型
    private String fieldId;                 // 作业农田ID
    private List<String> equipmentIds;      // 分配的设备ID列表
    private LocalDateTime startTime;        // 开始时间
    private LocalDateTime endTime;          // 结束时间
    private double completionRate;          // 完成率
    private String status;                  // 任务状态
    private String priority;                // 优先级
    private String description;             // 任务描述
    
    @Override
    public String toString() {
        return String.format("Task{\n" +
            "  ID: %s\n" +
            "  Name: %s\n" +
            "  Type: %s\n" +
            "  Field: %s\n" +
            "  Equipment: %s\n" +
            "  Time: %s - %s\n" +
            "  Progress: %.1f%%\n" +
            "  Status: %s\n" +
            "  Priority: %s\n" +
            "  Description: %s\n" +
            "}", 
            taskId, taskName, taskType, fieldId, 
            equipmentIds, startTime, endTime, 
            completionRate, status, priority, description);
    }
} 